import { get } from '@/utils/request'

// 幻灯片数据
export const getSwiperListApi = async () => {
  let ret = await get(`/api/home/swiper`)
  ret.data = ret.data.map((item) => ({
    ...item,
    path: `/detail/${item.id}`
  }))
  return ret
}

// 热门分类
export const hotCateListApi = () => get(`/api/home/hotcate`)

// 精品好菜
export const goodFoodListApi = (page = 1, size = 10) => {
  return get(`/api/home/goodfood?page=${page}&size=${size}`)
}
